execute store result score #select temp run data get entity @s Inventory[{Slot:8b}].components."minecraft:custom_data".select_arrow
execute store result score #size temp run data get entity @s Inventory[{Slot:8b}].components."minecraft:custom_data".bag
scoreboard players remove #size temp 1
execute if score #select temp = #size temp run return 1